import { WeApp } from '../../../common/common';
import wxService from '../../../common/wxService';

const app: WeApp = getApp() as WeApp;

interface GoodsVideoPageData {
}


interface GoodsVideoPage extends IPage {
}

class GoodsVideoPage {

    onLoad() {
        const video: { url: string, name: string } = wx.getStorageSync('video');
        if (!video.url) {
            wxService.showToast('视频地址不存在');
            setTimeout(function () {
                wxService.navigateBack();
            }, 1000);
            return;
        }
        this.setData({
            'video': video
        })
    }
}

Page(new GoodsVideoPage());
